package com.song.study.spring.Entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;

/**
 * @Author ZhangGuisong
 * @Date 2021/4/24-13:07
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Person {
    /**
     * @Value的使用
     *  1 ，基本数值的赋值
     *  2  SpEL  #{}
     *  3  从配置文件中取值  ${}
     */
    @Value("a song")
    private String name;
    @Value("#{20+5}")
    private Integer age;
    @Value("${person.address}")
    private String Address;
}
